-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Chrome AI as a Provider for our text generation Features #819
Conversation
@dkotter I did a quick check, and it works fine for me. I think once we have error handling in place, this will be ready to merge. Thanks for working on this. Great work!! |
…. Show link to setup instructions when selecting the Provider. Add another error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkotter This looks good to me and is ready for the merge. I'm just curious if we should add any note that Chrome AI is still in the experiment, though most users will know it when they attempt to enable it.
Description of the Change
Chrome is experimenting with adding built-in AI to their browser. The model they include is fairly lightweight and doesn't give quite as good results as larger models, but since it's built-in, there's no cost and all data stays private (also allows easy testing of some AI features without having to sign up for something).
At the moment, this feature is still being worked on and is only available in Chrome Canary, so there's a chance this never releases publicly or it may change quite a bit before the public release.
This PR integrates this browser AI API into our Title Generation, Excerpt Generation and Content Resizing Features. Because this API is 100% javascript, the way we integrate is a little unique compared to our other Providers:
How to test the Change
chrome://flags/#optimization-guide-on-device-model
and select Enabled BypassPerfRequirementchrome://flags/#prompt-api-for-gemini-nano
and select Enabled(await ai.languageModel.capabilities()).available;
in the consoleawait ai.languageModel.create();
in the console. This will likely fail but it’s intendedchrome://components
Optimization Guide On Device Model
present with a version greater or equal to 2024.5.21.1031. If there is no version listed, click on Check for update to force the download(await ai.languageModel.capabilities()).available;
in the console. If this returns “readily”, then you are all setChangelog Entry
Credits
Props @dkotter, @jeffpaul, @iamdharmesh, @faisal-alvi
Checklist: